#include<cstdio>
#include<cstring>
#include<string>
#include<iostream>
#include<map>
using namespace std;
int main()
{
	map<string,int> mp;
	map<string,int>::iterator i;
	int sum=0;
	string str;
	while(getline(cin,str))//scanf("%s",str)!=EOF)
	{
		mp[str]++;
		sum++;
	}
	for(i=mp.begin();i!=mp.end();i++)
	{
		cout<<i->first;
		printf(" %0.4lf\n",100.0*(i->second)/(double)sum);
	}
	return 0;
}


